/**
 */
package org.example.RobotModel.robotDsl.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

import org.example.RobotModel.robotDsl.Action;
import org.example.RobotModel.robotDsl.Activator;
import org.example.RobotModel.robotDsl.Device;
import org.example.RobotModel.robotDsl.Param;
import org.example.RobotModel.robotDsl.Retour;
import org.example.RobotModel.robotDsl.Robot;
import org.example.RobotModel.robotDsl.RobotDslFactory;
import org.example.RobotModel.robotDsl.RobotDslPackage;
import org.example.RobotModel.robotDsl.Sensor;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class RobotDslFactoryImpl extends EFactoryImpl implements RobotDslFactory
{
  /**
   * Creates the default factory implementation.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public static RobotDslFactory init()
  {
    try
    {
      RobotDslFactory theRobotDslFactory = (RobotDslFactory)EPackage.Registry.INSTANCE.getEFactory(RobotDslPackage.eNS_URI);
      if (theRobotDslFactory != null)
      {
        return theRobotDslFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new RobotDslFactoryImpl();
  }

  /**
   * Creates an instance of the factory.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RobotDslFactoryImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
      case RobotDslPackage.SYSTEM: return createSystem();
      case RobotDslPackage.ROBOT: return createRobot();
      case RobotDslPackage.DEVICE: return createDevice();
      case RobotDslPackage.SENSOR: return createSensor();
      case RobotDslPackage.ACTIVATOR: return createActivator();
      case RobotDslPackage.ACTION: return createAction();
      case RobotDslPackage.RETOUR: return createRetour();
      case RobotDslPackage.PARAM: return createParam();
      default:
        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public org.example.RobotModel.robotDsl.System createSystem()
  {
    SystemImpl system = new SystemImpl();
    return system;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Robot createRobot()
  {
    RobotImpl robot = new RobotImpl();
    return robot;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Device createDevice()
  {
    DeviceImpl device = new DeviceImpl();
    return device;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Sensor createSensor()
  {
    SensorImpl sensor = new SensorImpl();
    return sensor;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Activator createActivator()
  {
    ActivatorImpl activator = new ActivatorImpl();
    return activator;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Action createAction()
  {
    ActionImpl action = new ActionImpl();
    return action;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Retour createRetour()
  {
    RetourImpl retour = new RetourImpl();
    return retour;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Param createParam()
  {
    ParamImpl param = new ParamImpl();
    return param;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RobotDslPackage getRobotDslPackage()
  {
    return (RobotDslPackage)getEPackage();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @deprecated
   * @generated
   */
  @Deprecated
  public static RobotDslPackage getPackage()
  {
    return RobotDslPackage.eINSTANCE;
  }

} //RobotDslFactoryImpl
